package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.*;
import lombok.experimental.FieldDefaults;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("with_draw")
public class WithDraw {

    @Column(name = "id",isKey = true,isAutoIncrement = true)
    Long id;

    /**
     * 提现申请号
     */
    @Column(name = "withdraw_num",comment = "提现申请号")
    String withdrawNum;

    /**
     * 用户id
     */
    @Column(name = "uid",comment = "用户id")
    Long uid;
    /**
     * 金额
     */
    @Column(name = "amount",comment = "金额")
    BigDecimal amount;
    /**
     * 提现账户银行名称
     */
    @Column(name = "bank_name",comment = "提现账户银行名称")
    private String bankName;
    /**
     * 提现账户银行账号
     */
    @Column(name = "bank_account",comment = "提现账户银行账号")
    private String bankAccount;

    /**
     * 姓名
     */
    @Column(name = "account_name",comment = "银行账户姓名")
    private String accountName;
    /**
     * 银行卡手机号
     */
    @Column(name = "account_phone",comment = "银行卡手机号")
    private String accountPhone;

    /**
     * 提现状态
     */
    @Column(name = "state",comment = "支付状态")
    Short state;

    /**
     * 图片路径
     */
    @Column(name = "img_path",comment = "图片路径")
    String imgPath;

    @Column(name = "invoice_path",comment = "发票图片")
    String invoicePath;

    /**
     * 管理员操作时间
     */
    @Column(name = "admin_time",comment = "管理员操作时间")
    LocalDateTime adminTime;

    /**
     * 描述
     */
    @Column(name = "description",comment = "描述")
    String description;

    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creation_time") // 创建时间
    private LocalDateTime creationTime;

    @Column(name = "last_modification_time") // 最后修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
